package com.wisezone.java1902.d12_conections;

import java.util.ArrayList;

public class TestStudent {

	public static void main(String[] args) {
//		String[] strs = new String[10]; //可以存储10字符串元素
//		int[] ints = new int[10]; //可以存储10整形元素
//		Student[] students = new Student[10];
		
		//定义动态数组，功能:
		//1.存储大小空间可自动扩展
		//2.可以存储任意类型元素
		// MyArrayList 
//		MyArrayList<Student> lists = new MyArrayList<Student>();
//		lists.add("元素一");
//		lists.add("元素二");
		
		ArrayList<Student> lists = new ArrayList<Student>();
		
		Student s1 = new Student("小明",1001);
		Student s2 = new Student("小丽",1002);
		lists.add(s1);
		lists.add(s2);
		
		for (int i = 0; i < lists.size(); i++) {
			Student item = lists.get(i);
			System.out.println(item);
		}
		
		
		
		MyArrayList<String> strLists = new MyArrayList<String>();
		strLists.add("元素一");
		strLists.add("元素二");
		
		MyArrayList<Student> studentLists = new MyArrayList<Student>();
//		strLists.get(1)
		

	}

}
